#### README File for Scott, Lane and Schoenherr, "You Better Shop Around: Litigant Characteristics and Supreme Court Support" ##### 


File Name: AppenFigureA1_gender.R

Software: R (R Studio Version 2023.06.0+421) 

Description: This file creates Figure A1, a graph that shows the count of mentions of litigant's gender in newspaper coverage of salient Supreme Court cases by issue area (black bars) and the count of all articles on salient Supreme Court cases by issue area. The x-axis displays the names of issue areas taken up by the Supreme Court. The y-axis is the count of cases. The proportion displayed above the bars represents the proportion of cases in each issue area that mentions the gender of litigants in comparison to newspaper coverage of salient Supreme Court cases by issue area. The data spans Supreme Court cases heard between the 1998 and 2014 terms and covers 1,315 newspaper articles in 112 cases with a Case Salience Index score of 8. 

Data Files referenced in the script:
-  AllNewspaperArticlesCodedNoComments.xlsx (excel file) - original data collection effort to determine where litigants were mentioned in newspaper coverage of Supreme Court cases with particular attention to race and gender mentions. We focused on cases with a case salience index score of 8. 

-  Supreme Court Database (Version 2020 Release 01) (R data file) - see citation below: 
 Harold J. Spaeth, Lee Epstein, Andrew D. Martin, Jeffrey A. Segal, Theodore J. Ruger, and Sara C. Benesh. 2023 Supreme Court Database, Version 2020 Release 01. URL: http://supremecourtdatabase.org

#### Codebook #### 

Data: "AllNewspaperArticlesCodedNoComments.xlsx" 

caseId - Identification variable denoting how Supreme Court cases are organized; cases organized by Supreme Court citation 

caseName - name of the case that was heard by the Supreme Court 

article - identification variable for articles that referenced Supreme Court case 

litigant - variable denoting whether a specific article mentions the litigant involved in the Supreme Court case (coded 0 for no mention; coded 1 for mention) 

group - variable denoting whether a specific article mentions a group associated with the litigation (coded 0 for no mention; coded 1 for mention) 

gender - variable denoting whether the gender of a litigant is mentioned (coded 0 for no mention; coded 1 for mention) 

race - variable denoting whether the gender of a litigant is mentioned (coded 0 for no mention; coded 1 for mention) 

company - variable denoting whether the litigant is a company (coded 0 if the litigant is not a company; coded 1 if the litigant is a company) 


Data: Supreme Court Database (we only used 3 variables from dataset) 

caseId - Identification variable denoting how Supreme Court cases are organized; cases organized by Supreme Court citation 

caseName - name of the case that was heard by the Supreme Court 

issueArea - Issue areas accounted for in Supreme Court cases (1 = "Criminal Procedure"; 2 = "Civil Rights"; 3 = "First Amendment"; 4 = "Due Process"; 5 = "Privacy"; 6 = "Attorneys"; 7 = "Unions"; 8 = "Economic Activity"; 9 = "judicial power"; 10 = "Federalism"; 11 = "interstate relations"; 12 = "Federal Taxation"; 13 = "Miscellaneous"; 14 = "private law") 




Note: AllNewspaperArticlesCodedNoComments.xlsx and Supreme Court Database were merged. The final dataframe generated to create Figure A1 is mgender.df. 


The following codes are variables are in mgender.df (along with accompanying descriptions): 

- issueAreaf: Derived from the Supreme Court Database (see AppenFigureA1_gender.txt for citation) and accounts for the issue areas covered in Supreme Court cases. 

- variable: Accounts for the label on types of litigant mentions (gendered and total articles)

- value: Accounts for numerical values associated with types of litigant mentions (gendered and total articles)

- countType: Identifier to differentiate gendered mentions by issue area and total articles by issue area 

- countType.f: Clarifies the label on types of litigant mentions 

- label: The proportion of gendered mentions of litigants in Supreme Court cases by issue area relative to all Supreme Court cases by issue area between 1998 to 2014

- position: Sets the physical placement of the proportion in the graph 


